import router from './router';
import store from './store';
import Axios from 'axios';
Axios.interceptors.request.use(
    config=>{
        if(store.state.token){
            console.log(787878787878)
            config.headers.tokenenen=store.state.token
        }
        return config
    }
)
Axios.interceptors.response.use(
    response=>{
        if(response.status==200){
            const data=response.data;
            if(data.code==-1){
                localStorage.removeItem("token")
                store.commit("setToken","")
                console.log(999999999999999)
            }
        }
        return response
    }
)